javascript replace string at position

60

javascript replace string at position -

var myString = "Mar 16, 2010 00:00 AM";

myString = myString.substring(0, 13) + 
           "1" + 
           myString.substring(14, myString.length);
           
// output: Mar 16, 2010 10:00 AM

Comments

Submit
0 Comments